using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
    [Table("bgm_system_menu"), DataContract]
    public class SystemMenu
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "BgmMenuId", ResourceType = typeof(Resources.SystemMenuResource))]
        [Column("bgm_menu_seq", TypeName="int")]
        public int BgmMenuId { get; set; }

        [DataMember, Display(Name = "BgmMenuCode", ResourceType = typeof(Resources.SystemMenuResource))]
        [Column("bgm_menu_code", TypeName="ntext")]
        public string BgmMenuCode { get; set; }

        [DataMember, Display(Name = "BgmMenuName", ResourceType = typeof(Resources.SystemMenuResource))]
        [Column("bgm_menu_name", TypeName="ntext")]
        public string BgmMenuName { get; set; }

        [ForeignKey("UpperBgmMenu")]
        [DataMember, Display(Name = "UpperBgmMenuId", ResourceType = typeof(Resources.SystemMenuResource))]
        [Column("upper_bgm_menu_seq", TypeName="int")]
        public Nullable<int> UpperBgmMenuId { get; set; }

        [DataMember, Display(Name = "BgmMenuPath", ResourceType = typeof(Resources.SystemMenuResource))]
        [Column("bgm_menu_path", TypeName="ntext")]
        public string BgmMenuPath { get; set; }

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.SystemMenuResource))]
        [Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember]
        public virtual SystemMenu UpperBgmMenu { get; set; }
    }
}